<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>客户管理 leads客户</title>
<link href="${rc.contextPath}/common/css/common/common.css"rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${rc.contextPath}/common/js/common.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/jquery.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/thickbox.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/main.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/config.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/util.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/market/customer/recycling_customer.js"></script>
<script language="javascript" type="text/javascript" src="${rc.contextPath}/common/js/calendar/WdatePicker.js"></script>

<link rel="stylesheet" href="${rc.contextPath}/common/js/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css"/>
<script type="text/javascript" src="${rc.contextPath}/common/js/zTree/js/jquery.ztree.core-3.5.js"></script>
<script>
var deptJson = $deptJson;
var zNodes = $deptJson;
</script>
<style type="text/css">
.deploy{border:solid 1px gray; width:700px; height:350px;display:none; z-index:101;position:absolute; background-color:#FFFFFF;}
.deploy .title{width:100%;height:20px;line-height:50px; border-top:solid 1px red;background-color:#b60613;top:0px;}
#greyBackGround{background:#000000;width:100%; display:none; z-index:100; top:0px; left:0px; position:absolute;}

.deptTree{border:solid 1px gray; width:700px; height:500px;display:none; z-index:101;position:absolute; background-color:#FFFFFF;}
.deptTree .title{width:100%;height:20px;line-height:50px; border-top:solid 1px red;background-color:#b60613;top:0px;}
#deptTreeBackGround{background:#000000;width:100%; display:none; z-index:100; top:0px; left:0px; position:absolute;}
</style>
</head>
<body>
<center><div class="div6" id="waitDiv">加载中...</div></center>
<div id="bg" class="bg" style="display:none;"></div>
<div class="main">
  <!--可拖动 上部分-->
  <div class="position">
    <div class="p_left">当前位置：客户管理 &lt; 回收客户</div>
    <div class="p_right">
      <dl><dt>姓名：</dt><dd>$!{currentUser.ename}</dd></dl>
      <dl><dt>登录时间：</dt><dd><span id="nowDate"></span></dd></dl>
    </div>
  </div>
  <div class="topBox">
    <div class="mesCheck">
      <div class="title1"><strong>回收客户 </strong></div>
      <div class="box2C">
        <div class="tableForm">
        <form id="form">
          <table border="0" align="center" cellpadding="0" cellspacing="0" class="tab1">
            <tr>
              <th width="100">会员编号：</th>
              <td width="300"><input type="text" id="customId" class="input" maxlength="50" /></td>
              <input type="text" id="customIdForNull" class="input" style='display:none;' value='$!{customer.customId}' />
              <th width="100">联系人：</th>
              <td><input type="text" id="customName" class="input" maxlength="50" /></td>
            </tr>
            <tr>
              <th width="100">手机：</th>
              <td width="300"><input type="text" id="phone" class="input" maxlength="50" /></td>
              <th width="100">电子邮箱：</th>
              <td width="300"><input type="text" id="email" class="input" maxlength="50" /></td>              
            </tr>
          	<tr>
              <th width="100">注册日期：</th>
              <td>
              	<input type="text" id="startTime" size="15" class="input" onfocus="setStartTime()" onclick="this.value=''" readonly="readonly"/>
                <img onclick="setStartTimeImg()" src="${rc.contextPath}/common/js/calendar/skin/datePicker.gif" width="16" height="22"/>
                到
                <input type="text" id="endTime" size="15" class="input" onfocus="setEndTime()" onclick="this.value=''" readonly="readonly"/>
              	<img onclick="setEndTimeImg()" src="${rc.contextPath}/common/js/calendar/skin/datePicker.gif" width="16" height="22"/>
              </td>
             
            </tr> 
            
           <tr>
            #if($currentUser.isResponsible == 1)
              <th>所属人：</th>
              <td>
                <input id="dept" type="text" value="请选择"  style="width:120px; height: 25px;" readonly="readonly" onclick="showMenu()"/></ul>
                <div id="menuContent" class="menuContent" style="display:none; position: absolute;background-color: #EFEFEF;border: 1px solid #CCCCCC;">
					<ul id="treeDemo"  class="ztree" style="margin-top:0; width:160px;"></ul>
				</div>
               <select id="emp" style="width:120px; height: 25px;">
                	<option value="">请选择</option>
                </select>
              </td>
              #end
              <th>所属区域：</th>
              <td>
                <select onmouseup="changeClassB(this)">
                    <option value="">请选择</option>
		  			#foreach($area in $parentAreaList)
		  				<option value="$area.areaID">$area.name</option>
		  			#end
		  		</select>
		  		<select id="area">
		  		            <option value="">请选择</option>
		  					#foreach($area in $childAreaList)
		  					<option value="$area.areaID">$area.name</option>
		  					#end
		  		</select>
              </td>
            </tr>    
            
            <tr>
            
              <th width="100">分配日期：</th>
              <td>
              	<input type="text" id="startDeployTime" size="15" class="input" onfocus="setStartDeployTime()" onclick="this.value=''" readonly="readonly"/>
                <img onclick="setStartDeployTimeImg()" src="${rc.contextPath}/common/js/calendar/skin/datePicker.gif" width="16" height="22"/>
                到
                <input type="text" id="endDeployTime" size="15" class="input" onfocus="setEndDeployTime()" onclick="this.value=''" readonly="readonly"/>
              	<img onclick="setEndDeployTimeImg()" src="${rc.contextPath}/common/js/calendar/skin/datePicker.gif" width="16" height="22"/>
              </td>
              
              <th width="100">是否购买过商品：</th>
              <td width="300">
              	<select id="isBuy">
              		<option selected="selected" value="">全部</option>
              		<option value="1">是</option>
              		<option value="0">否</option>
              	</select>
              </td>
            </tr> 
            <tr>
              <th width="100">商品：</th>
              <td>
              	<select id="productCode">
		  			<option value="">请选择</option>
		  					#foreach($product in $productTypeEnumArray)
		  					<option value="$product.value">$product.label</option>
		  					#end
		  		</select>
              </td>
              <th width="100">到期日期：</th>
              <td>
              	<input type="text" id="startDueTime" size="15" class="input" onfocus="setStartTime()" onclick="this.value=''" readonly="readonly"/>
                <img onclick="setStartTimeImg()" src="${rc.contextPath}/common/js/calendar/skin/datePicker.gif" width="16" height="22"/>
                到
                <input type="text" id="endDueTime" size="15" class="input" onfocus="setEndTime()" onclick="this.value=''" readonly="readonly"/>
              	<img onclick="setEndTimeImg()" src="${rc.contextPath}/common/js/calendar/skin/datePicker.gif" width="16" height="22"/>
              </td>
              
            </tr> 
            <tr>
              <th width="100">按时间倒序排序：</th>
              <td width="300">
              		<input type="radio" id="isSort"  value="" onclick="this.value ='1'; query()"/>
              </td> 
              
               <th>未联系天数：</th>
              <td><input type="text" id="nolinkedDay1" class="input" maxlength="5" style="width:35px;"/>&nbsp;至&nbsp;<input type="text" id="nolinkedDay2" class="input" maxlength="5" style="width:35px;"/></td>
              </td> 
            </tr>
            <tr>
              <td colspan="6" >
                <span class="btnOper2 btn_inline" style="margin-left: 300px;"><a href="#" class="btn2" onclick="query()"><span>查询</span></a>&nbsp;&nbsp;&nbsp;<a href="#" class="btn2" onclick="doReset()" ><span>清空</span></a></span>         
              </td>
            </tr>  
            <tr></tr>            
          </table>
          </form>
          
           <!-- 隐藏控件 -->
	      <input id="rootPath" type="text" value="${rc.contextPath}" style="display: none" />
	      <input id="customerType" type="text" value="${customerType}" style="display: none"/>
	      <input id="userId" type="text" value="${currentUser.empno}" style="display: none"/>
	      <input id="deptId" type="text" value="" style="display: none"/>
	      <input id="currentdid" type="text" value="${currentUser.id}" style="display: none"/>
	      #if($shiro.hasPermission("客户调配"))
         <input id="isHasCustomAlot" type="text" value="0" style="display: none"/>
         #end
        </div>
        
        <div  class="overflow" style="overflow-x:auto ; width:100%;">
         <!-- 数据列表 -->
        <table  class="tab2" id="dataList">
         
        </table>
        
         <!-- 推送弹窗 -->
         <input type="text" id="pushCustomerId" style="display: none;" />
         <div id="configBatchInfo" style="" class="div4" >
		 	
		 </div>
		 <!-- 添加记录弹窗 -->
		 <div id="addCustomerRemark" style="padding: 50px; text-align: center;z-index:100;" class="div4">
		 	<table>
		 		<tr>
		 			<td><textarea id="remark" rows="10" cols="10"></textarea></td>
		 		</tr>
		 		<tr>
		 			<td>
		 				<input type="text" id="remarkCustomerId" style="display: none;" />
		 				<div class="btnOper2 btn_inline"><a href="#" class="btn2" onclick="doAddRemark()"><span>添加</span></a>&nbsp;&nbsp;&nbsp;</div>
		 				<div class="btnOper2 btn_inline"><a href="#" onclick="closeWindow('addCustomerRemark')" class="btn2"><span>关闭</span></a>&nbsp;&nbsp;&nbsp;</div>
		 			</td>
		 		</tr>
		 	</table>	
		 </div>
		 
		 <!-- 查看单条记录弹窗 -->
		 <div id="modifyCustomerRemark" style="padding: 50px; text-align: center;z-index:100" class="div4">
		 	<table>
		 		<tr>
		 			<td><textarea id="remark" rows="10" cols="10"></textarea></td>
		 		</tr>
		 		<tr>
		 			<td>
		 				<input type="text" id="remarkCustomerId" style="display: none;" />
		 				<input type="text" id="customerId" style="display: none;" />
		 				<div class="btnOper2 btn_inline"><a href="#" onclick="closeWindow('modifyCustomerRemark', 1)" class="btn2"><span>关闭</span></a>&nbsp;&nbsp;&nbsp;</div>
		 			</td>
		 		</tr>
		 	</table>	
		 </div>
		 <div id="addDeal" style="text-align: center;z-index:100;" class="div3">
		  	<table class="tab3">
		  		<tr bgcolor="#CECECE">
		  			<input type="text" id="customerId" style="display: none;" />
		  			<td colspan="2">添加交易</td>
		  		</tr>
		  		<tr>
		  			<td>会员编号：</td>
		  			<td><input type="text" size="20" class="middleInput"" id="cus_id" name="customerId"/></td>
		  		</tr>
		  		<tr>
		  			<td>客户名称：</td>
		  			<td><input type="text" size="20" class="middleInput" id="cname" name="cname"/></td>
		  		</tr>
		  		
		  		<tr>
		  			<td>商品名称：</td>
		  			<td>
		  				<select id="product">
		  					<option value="">请选择</option>
		  					#foreach($product in $productTypeEnumArray)
		  					<option value="$product.value">$product.label</option>
		  					#end
		  				</select>&nbsp;
		  				<span style="color: red">*</span>
		  			</td>
		  		</tr>
		  		<tr>
		  			<td>商品个数：</td>
		  			<td><input type="text" size="20" class="middleInput" id="goodsCount" name="goodsCount"/>&nbsp;<span style="color: red">*</span></td>
		  		</tr>
		  		<tr>
		  			<!-- <td></td>
		  			<td><input type="text" size="20" class="middleInput" id="date" name="date"/></td> -->
		  			 <td width="100">预计消耗日期：</td>
              <td>
              	<input type="text" id="startTime1" name="date" size="15" class="input" onfocus="setStartTime()" onclick="this.value=''" readonly="readonly"/>
                <img onclick="setStartTimeImg1()" src="${rc.contextPath}/common/js/calendar/skin/datePicker.gif" width="16" height="22"/>
                &nbsp;<span style="color: red">*</span>
              </td>
		  		</tr>
		  		<tr>
		  			<td>预计消耗金额：</td>
		  			<td><input type="text" size="20" class="middleInput" id="amount" name="amount"/>&nbsp;<span style="color: red">*</span></td>
		  		</tr>
		  		
		  		<tr>
		  			<td>流程阶段：</td>
		  			<td><input type="text" size="20" class="middleInput" id="consumePhase1" name="consumePhase" value="初期沟通" />
		  			<span class="btnOper2 btn_inline" ><a href="#" onclick="showPhase()" class="btn3"><span>GO</span></a></span>
		  			</td>
		  		</tr>
		  		
		  		<tr>
		  			<td>业务类型：</td>
		  			<td><select id="businessType">
		  					#foreach($consumeBusiness in $consumeBusinessTypeEnmu)
		  					<option value="$consumeBusiness.label">$consumeBusiness.label</option>
		  					#end
		  				</select>&nbsp;<span style="color: red">*</span></td>
		  		</tr>
		  		<tr>
		  			<td>状态：</td>
		  			<td><select id="state">
		  					#foreach($consumeState in $consumeStateEnmu)
		  					<option value="$consumeState.label">$consumeState.label</option>
		  					#end
		  				</select>&nbsp;<span style="color: red">*</span></td>
		  				
		  		</tr>
		  		<tr>
		  			<td>机会说明：</td>
		  			<td><textarea rows="3" cols="20" class="middleInput" id="explain" name="explain" ></textarea></td>
		  		</tr>
		  	</table>
		  	<div id="doAddDeal" style="float:center;" class="btnOper2 btn_inline"><a href="#" onclick="doAddDeal()" class="btn2"><span>添加交易</span></a>&nbsp;&nbsp;&nbsp;<a href="#" class="btn2" onclick="doAddDealReset()" ><span>清空</span></a>&nbsp;&nbsp;&nbsp;
		  	<a href="#" onclick="closeWindow('addDeal')" class="btn2"><span>关闭</span></a>&nbsp;&nbsp;&nbsp;</div>
		  </div>
		  
		  <div id="showPhase" style="text-align: center;z-index:100;" class="div10">
		  		
		  		<table class="tab5">
		  		<tr bgcolor="#CECECE">
		  			<input type="text" id="customerId" style="display: none;" />
		  			<td>流程阶段</td>
		  			<td></td>
		  		</tr>
		  		<tr bgcolor="#FEF2E8">
		  			<td><a href="#" id="back" onclick="back(0)" class="back_no">回退</a>&nbsp;<a href="#" id="forward" onclick="forward(0)" class="forward">推进</a></td>
		  			<td>完整流程</td>
		  		</tr>
		  		<tr>
		  		<td id="phase" style="border-top: 1px ridge;border-left: 1px ridge;border-right: 1px;border-bottom: 1px solid; height: 300px;width: 50%;">
			  		
			  	</td>
			  	<td class="phase_6" style="border-top: 1px solid;border-left: 1px solid;border-right: 0px;border-bottom: 1px solid;width: 50%;">
			  		
			  	</td>
		  		</tr>
		  		
		  		<tr bgcolor="#FEF2E8">
		  			<td colspan="2"><div class="btnOper2 btn_inline"><a href="#" class="btn2" onclick="selectAndCloseWindow('showPhase')"><span>确认</span></a>&nbsp;&nbsp;&nbsp;<a href="#" class="btn2" onclick="closeWindow('showPhase')"><span>关闭</span></a></div></td>
		  		</tr>
		  		</table>
		  </div>
		 <!-- 查看记录弹窗 -->
		  <div id="queryCustomerRemark" style="padding: 50px; text-align: center;" class="div4">
		 	<table id="remarkDataList">
		 		
		 	</table>
		 </div>
       </div>
		<br />
         #if($shiro.hasPermission("批量调配"))
	      		  <div class="btnOper2 btn_inline"><a href="#"  onclick="bathCustomDeploy();" type="button" class="btn2" /><span>批量调配</span></a>&nbsp;&nbsp;&nbsp;</div>
	     #end
	     #if($shiro.hasPermission("全部批量调配"))
	      		  <div class="btnOper2 btn_inline"><a href="#"  onclick="bathAllCustomDeploy();" type="button" class="btn2" /><span>全部批量调配</span></a>&nbsp;&nbsp;&nbsp;</div>
	     #end
        <!-- #BeginLibraryItem "/Library/page.lbi" -->
        <div class="page clearfix">
          <input type="text" id="pageNow" style="display: none;"  />
          <ul class="le">
            <li>显示<span id="pageSize"></span></li>
            <li>共<span id="rowCount"></span>条</li>
            <li><span id="pageIndex"></span>-<span id="pageCount"></span>页</li>
          </ul>
          <ul class="ri">
            <li><a href="#" class="go" onclick="goInputPage()">&nbsp;</a></li>
            <li>到
              <input type="text" id="inputPage" class="input" size="4" />
              页</li>
             
            <li><a style="cursor:pointer;" class="btn" onclick="query('lastPage')">[末页]</a></li>
            <li><a style="cursor:pointer;" class="btn" onclick="query('nextPage')">[下页]</a></li>
            <li><a style="cursor:pointer;" class="btn" onclick="query('prevPage')">[前页]</a></li>
            <li><a style="cursor:pointer;" class="btn"onclick="query(1)">[首页]</a></li>
          </ul>
        </div>
        <!-- #EndLibraryItem -->
        
        <div id="deploy" class="deploy" style="width: 600px;height: 230px;">
			<form id="deployForm" action="${rc.contextPath}/ruleSet/customDeploy/customDeploy" method="post">
			   	<div class="title"></div>
			   	<div style="margin-left: 20px;">客户调配</div>
			   	<div style="margin-left: 20px;">
				   	<input id="ecrId" name="ecrId" type="hidden" />
				   	<input id="cmaId" name="cmaId" type="hidden" />
				   	<input id="ecrIdStr" name="ecrIdStr" type="hidden" />
				   	
			   		<input id="cusIdStr" name="cusIdStr" type="hidden" />
			   		<input id="cusId" name="cusId" type="hidden" />
			   		<input id="productId" name="productId" type="hidden" />
			   		<input id="productCodeDeploy" name="productCode" type="hidden" />
			   		<input id="deployCName" name="cName" type="hidden" />
			   		<input id="deployMail" name="email" type="hidden" />
			   		<input id="deployPhone" name="phone" type="hidden" />
			   		<input id="deployCurrentDeptNo" name="currentDeptNo" type="hidden" />
			   		<input id="deployCurrentEmpNo" name="currentEmpNo" type="hidden" />
			   		<input id="deployCurrentDeptName" name="currentDeptName" type="hidden" />
			   		<input id="deployCurrentEmpName" name="currentEmpName" type="hidden" />
			   		<input id="deployDeptName" name="deployDeptName" type="hidden" />
			   		<input id="deployEmpName" name="deployEmpName" type="hidden" />
			   		
					当前所属部门：<label id="deployCurrentDeptNameLabel"></label>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					当前所属人：<label id="deployCurrentEmpNameLabel"></label><br/>
					调配到部门：
<!-- 					<select id="deployDeptId" name="deployDeptId" style="width: 130px;">
					<option value="">---请选择---</option>
					#if($deptList)
					#foreach($dept in $deptList)
					<option value="$dept.id">$dept.dname</option>
					#end
					#end
			  		</select> -->
			  		<input id="deployDeptId" name="deployDeptId" type="hidden" />
			  		<input id="tempDeptId"  type="text" />
			  		<a href="javaScript:displayDeptTree();"><img src="${rc.contextPath}/common/images/search.jpg" alt="" width="15px;" height="15px;" /></a>
			  		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			  		所属人：
			  		<select id="deployEmpNo" name="deployEmpNo" style="width: 130px;">
			  			<option value="">---请选择---</option>
			  		</select><br/>
			  		原因：<br/><textarea id="reason" name="reason" rows="5" cols="10" style="width: 450px;height: 30px;"></textarea>
					<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input id="deployBtnCancel" type="button" value="取消" style="float:right;margin-right:20px;"/>
					<input id="bathDeployBtn" type="button" value="确定" style="display: none;float:right;margin-right:10px;"/>
					<input id="deployBtn" type="button" value="确定" style="float:right;margin-right: 10px;"/>
				</div>   
			</form>
			</div>
			<div id="deptTree" class="deptTree" style="width: 800px;height: 900px;">
				<div class="title"></div><br/>
				<div style="margin-left: 20px;">选择部门
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input id="deptTreeBtnCancel" type="button"  value="取消" style="float: right;margin-right: 10px;"/>
					<input id="deptTreeBtnConfirm" type="button"  value="确定" style="float: right;margin-right: 10px;"/>&nbsp;&nbsp;
					<input id="queryDeptTreeBtnConfirm" type="button"  value="确定" style="float: right;margin-right: 10px;" />&nbsp;&nbsp;
				</div>
				<div style="margin-left: 20px;overflow-x: auto; overflow-y: auto;float: left;" class="zTreeDemoBackground left" >
					<ul id="treeDemo1" class="ztree" style="width: 650px;height: 300px;"></ul>
				</div>
			</div>
      </div>
    </div>
  </div>
  <form id="redirectForm" action="${rc.contextPath}/ruleSet/customDeploy/customDeployPage" style="display: none;">
		<input name="pageNow" type="hidden" value="$!pageView.pageNow"></input>
	</form>
</div>

</body>
</html>
